<div id="xrayPrint">
    <style scoped>
        .full-height {
            height: 100%;
        }

        .full-width {
            width: 100%;
        }

        @media print {
            table.orthdontic-xray-print-view-table { page-break-inside:auto }
            .orthdontic-xray-print-view-table tr    { page-break-inside:avoid; page-break-after:auto }
            .orthdontic-xray-print-view-table thead { display:table-header-group }
            .orthdontic-xray-print-view-table tfoot { display:table-footer-group }
        }
    </style>
    <div style="text-align:center; height:35px;">
        <span style="font-weight: bold;font-size: 17px;">X光分析</span>
    </div>
    <div style="border-top:2px solid black;height:30px;border-bottom:1px solid black;width:100%;text-align:right">
        <span class="pull-right glyphicon" style="padding-right: 5px; padding-top: 3px;font-weight: bold;font-size: 19px;">
            患者：{{patient.name}}&nbsp;&nbsp;病历号：{{patient.privateId}}
        </span>
    </div>
    <div style="padding: 5px">
        <span style="font-size:17px; font-weight:bolder">X光片分析</span>
        <div style="width:700px;border:1px solid #efefef;background-color:#f7f6f5;margin-top:10px;"
             class="ortho-xray-image-container" ng-repeat="item in xrayImages track by $index">
            <div class="ortho-xray-image-title">第{{$index + 1 | toChineseNumberString}}次 {{item[1].imageDateString}} </div>
            <div class="panel-body row" style="width:100%">
                <div ng-repeat="image in item" class="col-md-2 image-item-border" style="margin:5px 5px 9px 5px;height:150px; float:left" ng-style="{'width':image.position==0?'310px':'138px'}">
                    <img ng-src="{{image.thumbnailUrl}}" style="text-align:center;vertical-align:middle;display:table-cell;margin: 0 auto;" ng-class="{'full-height':!image.isWidthLarger,'full-width':image.isWidthLarger}" />
                </div>
            </div>
        </div>
    </div>

    <div style="padding:5px;">
        <div>
            <div class="panel-heading" style="margin-top: 10px;height:25px;">
                <span class="pull-left glyphicon" style="margin-left:-10px;padding-top: 3px;font-weight: bold;font-size: 16px;">{{category.name}}</span>
            </div>
            <div>
                <table class="orthdontic-xray-print-view-table" style="width:100%;border:1px solid #efefef">
                    <tr style="background-color: #e3e3e3;height:35px;border-bottom:1px solid #e3e3e3;">
                        <td width="15%" align="center">
                            <span class="item-title">治疗项目</span>
                        </td>
                        <td width="15%" align="center">
                            <span class="item-title">正确均值</span>
                        </td>
                        <td width="14%" align="center" ng-repeat="seqNum in [0,1,2,3,4]">
                            <span class="item-title" ng-if="xrayImages[seqNum]">
                                第{{seqNum + 1 | toChineseNumberString}}次测量值
                            </span>
                        </td>
                    </tr>
                    <tr style="height:35px;border-bottom:1px solid #efefef;background-color:#f7f6f5" ng-repeat="(fieldId, field) in currentXrayData">
                        <td width="15%" align="center">
                            <span class="item-title">{{field.name}}</span>
                        </td>
                        <td width="15%" align="center">
                            <span class="item-title">{{field.value}}</span>
                        </td>
                        <td width="14%" align="center" ng-repeat="seqNum in [0,1,2,3,4]">
                            <div ng-if="xrayImages[seqNum]">
                                <span class="item-title">{{field.xrayValues[seqNum]}}</span>
                            </div>
                        </td>
                    </tr>
                </table>
            </div>
        </div>
    </div>
    <div id="imgContainer" style="width:0;height:0;overflow:hidden">
    </div>
</div>